* xdisp.c (display_text_line): Use temporary variable.
authorJim Blandy <jimb@redhat.com>
Mon, 14 Jun 1993 15:06:46 +0000 (15:06 +0000)
committerJim Blandy <jimb@redhat.com>
Mon, 14 Jun 1993 15:06:46 +0000 (15:06 +0000)
src/xdisp.c

index 62a029c818d660a553ebfc952ea3a0bd68e6ffd0..e9777efee39c5c1c5f231fe7e065fb0c667f8f2a 100644 (file)
@@ -2062,14 +2062,17 @@ display_text_line (w, start, vpos, hpos, taboffset)
       unsigned char *p = XSTRING (Voverlay_arrow_string)->data;
       int i;
       int len = XSTRING (Voverlay_arrow_string)->size;
+      int arrow_end;
 
       if (len > width)
        len = width;
       for (i = 0; i < len; i++)
        startp[i] = p[i];
-      if (desired_glyphs->used[vpos] <
-         (len + startp - desired_glyphs->glyphs[vpos]))
-       desired_glyphs->used[vpos] = len + startp - desired_glyphs->glyphs[vpos];
+
+      /* Bug in SunOS 4.1.1 compiler requires this intermediate variable.  */
+      arrow_end = (startp - desired_glyphs->glyphs[vpos]) + len;
+      if (desired_glyphs->used[vpos] < arrow_end)
+       desired_glyphs->used[vpos] = arrow_end;
 
       overlay_arrow_seen = 1;
     }